<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>绝对定位--压盖</title>

    <style>
        .movie {
            width: 1600px;
            height: 300px;
            margin: 50px auto;
        }

        .movie ul {
            list-style: none;
        }

        .movie ul li {
            width: 200px;
            height: 300px;
            float: left;
            margin-left: 10px;
            position: relative;
            /* 溢出隐藏 */
            overflow: hidden
        }

        .movie ul li img.mv {
            width: 200px;
            height: 300px;
        }

        .movie ul li img.type {
            position: absolute;
            right: 8px;
            top: 8px;
        }

        .movie ul li .cover {
            position: absolute;
            width: 200px;
            height: 300px;
            /* 先溢出,隐藏 */
            top: 300px;
            left: 0;
            background-color: rgba(0, 0, 0, 0.4);
            color: white;
        }

        .movie ul li:hover .cover {
            top: 0;
        }
    </style>
</head>

<body>
    <div class="movie">
        <ul>
            <li>
                <img class="mv" src="image/mv1.jpg" alt="">
                <img class="type" src="image/mdb.png" alt="">
                <div class="cover"> 电影很好看</div>
            </li>
            <li>
                <img class="mv" src="image/mv2.jpg" alt="">
                <img class="type" src="image/m-vip.png" alt="">
                <div class="cover"> 电影很好看</div>
            </li>
            <li>
                <img class="mv" src="image/mv3.jpg" alt="">
                <img class="type" src="image/m-yg.png" alt="">
                <div class="cover"> 电影很好看</div>
            </li>
            <li>
                <img class="mv" src="image/mv4.jpg" alt="">
                <div class="cover"> 电影很好看</div>
            </li>
            <li>
                <img class="mv" src="image/mv5.jpg" alt="">
                <div class="cover"> 电影很好看</div>
            </li>
            <li>
                <img class="mv" src="image/mv6.jpg" alt="">
                <div class="cover"> 电影很好看</div>
            </li>
        </ul>
    </div>
</body>

</html>